package com.secondary.pojos;


import java.util.Date;
import java.util.Set;

/**
 * Goods entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class Goods implements java.io.Serializable {

	// Fields

	private Integer id;
	private String name;
	private String content;
	private Set pic;
	private Integer commentId;
	private Integer state;
	private Date startTime;
	private Integer postDays;
	private Set<Category> categorys;
	private User seller;
	private String contact;
	private String email;
	private String phone;
	private String address;
	private Integer qq;
	private int quality;
	
	private Date stopTime;
	// Constructors

	/** default constructor */
	public Goods() {
	}
	public Goods(int id){
		this.id=id;
	}

	public Goods(Integer id, String name, Date startTime, User seller,
			int quality) {
		
		this.id = id;
		this.name = name;
		this.startTime = startTime;
		this.seller = seller;
		this.quality = quality;
	}


	public Goods(Integer id, String name, Integer state, Date startTime,
			Integer postDays) {
		super();
		this.id = id;
		this.name = name;
		this.state = state;
		this.startTime=startTime;
		this.postDays = postDays;
	}

	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Set getPic() {
		return this.pic;
	}

	public void setPic(Set pic) {
		this.pic = pic;
	}

	public Integer getCommentId() {
		return this.commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Integer getPostDays() {
		return this.postDays;
	}

	public void setPostDays(Integer postDays) {
		this.postDays = postDays;
	}

	public Set<Category> getCategorys() {
		return categorys;
	}

	public void setCategorys(Set<Category> categorys) {
		this.categorys = categorys;
	}

	public User getSeller() {
		return seller;
	}

	public void setSeller(User seller) {
		this.seller = seller;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	

	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public Integer getQq() {
		return qq;
	}

	public void setQq(Integer qq) {
		this.qq = qq;
	}



	public int getQuality() {
		return quality;
	}



	public void setQuality(int quality) {
		this.quality = quality;
	}

	public Date getStopTime() {
	
		return new Date(new Long(postDays)*86400000+startTime.getTime());
	}

	public void setStopTime(Date stopTime) {
		this.stopTime = stopTime;
	}

	

	
}